
# coding=utf-8
# 代码文件：chapter1/ch1.11.3-2.py

import re

p = r'\w+@163\.com'  # 声明正则表达式

# 要验证的长字符串
text = '''
Tony's email is tony_guan588@163.com."
Tom's email is tom@163.com."  
张三的邮箱是：zhang@163.com。"     
'''

# findall函数在text字符串中查找所有的163邮箱
mlist = re.findall(p, text)
print(mlist)
